//
//  AboutController.m
//  History
//
//  Created by 七 on 16/9/6.
//  Copyright © 2016年 kane. All rights reserved.
//

#import "AboutController.h"
#import "PermitController.h"
#import "PrivacyController.h"
@interface AboutController ()<UIScrollViewDelegate>
{
    __weak IBOutlet UILabel *introduceLbl;
    __weak IBOutlet UIButton *useBtn;
    __weak IBOutlet UIButton *privateBtn;
    __weak IBOutlet UIScrollView *aboutScroll;
    __weak IBOutlet UIView *navView;
    IBOutlet UIView *BGView;
    __weak IBOutlet UILabel *titleLbl;
    __weak IBOutlet UILabel *lineLbl;
    __weak IBOutlet UILabel *focusLbl;
    __weak IBOutlet UILabel *contactLbl;
    
}
@end

@implementation AboutController

- (void)viewDidLoad {
    [super viewDidLoad];
    //修改label的行间距
    NSMutableAttributedString *attributedString = [[NSMutableAttributedString alloc] initWithString:introduceLbl.text];
    NSMutableParagraphStyle *paragraphStyle = [[NSMutableParagraphStyle alloc] init];
    [paragraphStyle setLineSpacing:6];
    [attributedString addAttribute:NSParagraphStyleAttributeName value:paragraphStyle range:NSMakeRange(0, [introduceLbl.text length])];
    introduceLbl.attributedText = attributedString;
    //设置button边框
    [useBtn.layer setCornerRadius:5.0];
    [useBtn.layer setBorderWidth:1.0];
    [useBtn.layer setBorderColor:[UIColor lightGrayColor].CGColor];
    [privateBtn.layer setCornerRadius:5.0];
    [privateBtn.layer setBorderWidth:1.0];
    [privateBtn.layer setBorderColor:[UIColor lightGrayColor].CGColor];
    aboutScroll.contentSize = CGSizeMake(0, 534);
    aboutScroll.showsHorizontalScrollIndicator = NO;
    navView.backgroundColor = KKColor_DarkGray_White;
    titleLbl.textColor = KKColor_Black_LightGary;
    lineLbl.backgroundColor = KKColor_NavLineColor;
    
    introduceLbl.textColor = KKColor_Black_LightGary;
    [useBtn setTitleColor:KKColor_Black_LightGary forState:UIControlStateNormal];
    [privateBtn setTitleColor:KKColor_Black_LightGary forState:UIControlStateNormal];
    focusLbl.textColor = KKColor_Black_LightGary;
    contactLbl.textColor = KKColor_Black_LightGary;
    aboutScroll.backgroundColor = KKColor_White_Darkgray;
}


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

#pragma mark - User Action
- (IBAction)backPress:(id)sender {
    [self.navigationController popViewControllerAnimated:YES];
}

- (IBAction)userPressed:(id)sender {
    PermitController *permitVC = [[PermitController alloc] init];
    [self.navigationController pushViewController:permitVC animated:YES];
}

- (IBAction)privatePressed:(id)sender {
    PrivacyController *privateVC = [[PrivacyController alloc] init];
    [self.navigationController pushViewController:privateVC animated:YES];
}

@end
